import Swiper from '../../../libs/swiper/swiper-bundle.min.mjs'

let mySwiper = new Swiper('.swiper', {
  direction: 'horizontal', // 垂直切换选项
  loop: true, // 循环模式选项
  mousewheel: true,
  // 自动切换
  autoplay: {
    delay: 3000, // 自动切换时间间隔
    pauseOnMouseEnter: true, // 鼠标进入swiper时，停止自动切换
    disableOnInteraction: false, // 用户操作swiper之后自动切换不会停止
  },
  // 如果需要分页器
  pagination: {
    el: '.swiper-pagination',
    clickable: true,
  },
  // 淡入淡出
  effect: 'fade',



})
for (let i = 0; i < mySwiper.pagination.bullets.length; i++) {
  mySwiper.pagination.bullets[i].onmouseover = function () {
    this.click()
  }
}
export default mySwiper